<!-- Example table -->
<div class="container_12"> 
    <div class="module">
       	<h2><span><?=$_title?></span></h2>
        <div class="module-table-body">
           	<div style="margin-top:13px;">
				<?php
				if(isset($errMsg)){?>
					<span class="notification"><?php echo $_MESSESGE[$errMsg];?></span>
				<?php }?>
			</div>
			<table id="myTable" class="tablesorter">
            	<thead>
                    <tr>
						<th>#</th>
						<th>Venue Name</th>
						<th>Display Name</th>
						<!-- <th>Description</th> -->
						<th>Min Capacity</th>
						<th>Max Capacity</th>
						<th>Available Seating </th>
						<th>Address </th>
						<th>Conatact Person</th>
						<th>Booking Mode</th>
						<!-- <th>Inclusion</th>
						<th>Exclusion</th> -->
						<th>Parking</th>
						<th>Landmark</th>
						<th style="width:6%; "></th>
                    </tr>
                </thead>
                <tbody>
					<?php
					$arrBookingMode = array(1=>'Online',2=>'Offline',3=>'Both');
					$i =0;
					foreach($venues as $key => $val){?>
                        <tr>
                            <td class="align-center"><?php echo $i+1;?></td>
                            <td><?php echo $val['venue_name'];?></td>
							<td><?php echo $val['display_name'];?></td>
							<!-- <td><?php echo substr($val['venue_description'],0,30).'...';?></td> -->
							<td><?php echo $val['min_capacity'];?></td>
							<td><?php echo $val['max_capacity'];?></td>
							<td><?php echo $val['available_seating'];?></td>
							<td><?php echo $val['address'];?></td>
							<td><?php echo $val['contact_person'];?></td>
							<td><?php echo $arrBookingMode[$val['booking_mode']];?></td>
							<!-- <td><?php echo $val['inclusion'];?></td>
							<td><?php echo $val['exclusion'];?></td> -->
							<td><?php echo ($val['parking'] == 1)?'Yes':'No';?></td>
							<td><?php echo $val['landmark'];?></td>
							<td>
								<?php
								if($val['status']==1){?>
									<a href="?action=deactive&id=<?php echo $val['id']?>"><img src="<?php echo _SITE_ADMIN_URL_?>/images/tick-circle.gif" tppabs="<?php echo _SITE_ADMIN_URL_?>/images/tick-circle.gif" width="16" height="16" title="Active" /></a>
                                <?php }else{?>
									<a href="?action=active&id=<?php echo $val['id']?>"><img src="<?php echo _SITE_ADMIN_URL_?>/images/minus-circle.gif" tppabs="<?php echo _SITE_ADMIN_URL_?>/images/tick-circle.gif" width="16" height="16" title="In-Active" /></a>
								<?php }?>
								<a href="<?php echo _SITE_ADMIN_URL_?>venue/venue_edit.php?id=<?php echo $val['id']?>"><img src="<?php echo _SITE_ADMIN_URL_?>/images/pencil.gif" tppabs="<?php echo _SITE_ADMIN_URL_?>/images/pencil.gif" width="16" height="16" title="Edit" /></a>
                                <a href="javascript:confirmDelete('?action=delete&id=<?php echo $val['id']?>')"><img src="<?php echo _SITE_ADMIN_URL_?>/images/bin.gif" tppabs="<?php echo _SITE_ADMIN_URL_?>/images/bin.gif" width="16" height="16" title="Delete" /></a>
                            </td>
                        </tr>
					<?php $i++; }?>
                </tbody>
            </table>
            <div class="pager" id="pager">
                <form action="">
                    <div>
                        <img class="first" src="<?php echo _SITE_ADMIN_URL_?>/images/arrow-stop-180.gif" tppabs="<?php echo _SITE_ADMIN_URL_?>/images/arrow-stop-180.gif" alt="first"/>
                        <img class="prev" src="<?php echo _SITE_ADMIN_URL_?>/images/arrow-180.gif" tppabs="<?php echo _SITE_ADMIN_URL_?>/images/arrow-180.gif" alt="prev"/> 
                        <input type="text" class="pagedisplay input-short align-center"/>
                        <img class="next" src="<?php echo _SITE_ADMIN_URL_?>/images/arrow.gif" tppabs="<?php echo _SITE_ADMIN_URL_?>/images/arrow.gif" alt="next"/>
                        <img class="last" src="<?php echo _SITE_ADMIN_URL_?>/images/arrow-stop.gif" tppabs="<?php echo _SITE_ADMIN_URL_?>/images/arrow-stop.gif" alt="last"/> 
                        <select class="pagesize input-short align-center">
                            <option value="10" selected="selected">10</option>
                            <option value="20">20</option>
							<option value="30">30</option>
                            <option value="40">40</option>
                        </select>
                    </div>
                </form>
            </div>
            <!-- <div class="table-apply">
                <form action="">
                    <div>
						<span>Apply action to selected:</span> 
                        <select class="input-medium">
                            <option value="1" selected="selected">Select action</option>
                            <option value="2">Publish</option>
                            <option value="3">Unpublish</option>
                            <option value="4">Delete</option>
                        </select>
                    </div>
                </form>
            </div> -->
        <div style="clear: both"></div>
    </div> <!-- End .module-table-body -->
</div> <!-- End .module -->
<script>
	function confirmDelete(delUrl) {
		if (confirm("Are you sure you want to delete")) {
			document.location = delUrl;
		}
	}
</script>